package de.home.gpio.pinService;

import com.pi4j.io.gpio.GpioPinDigitalOutput;

public class PinOutputService implements PinService {

   GpioPinDigitalOutput outputPin;

   public PinOutputService(GpioPinDigitalOutput outputPin) {
      this.outputPin = outputPin;
   }

   public void setState(boolean state) {
      outputPin.setState(state);
   }

   public void setHigh() {
      outputPin.high();
   }

   public void setLow() {
      outputPin.low();
   }

   public GpioPinDigitalOutput getPin() {
      return outputPin;
   }

}
